package com.yuhs.zixing.shop.manager.business.user.impl;

import com.yuhs.zixing.shop.dal.business.user.entity.UserInfoDO;
import com.yuhs.zixing.shop.dal.business.user.mapper.UserInfoMapper;
import com.yuhs.zixing.shop.manager.business.user.UserInfoManager;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @ClassName UserInfoManagerImpl
 * @Description UserInfoManagerImpl
 * @Author yuhs
 * @CreateDate 2021/6/26
 **/
@Slf4j
@Component
public class UserInfoManagerImpl implements UserInfoManager {

    @Resource
    UserInfoMapper userInfoMapper;


    @Override
    public UserInfoDO getUserInfo() {
        return userInfoMapper.selectByPrimaryKey(1L);
    }

    /**
     * 添加用户
     *
     * @param userInfoDO
     */
    @Override
    public void addUserInfo(UserInfoDO userInfoDO) {

        userInfoMapper.insert(userInfoDO);

    }


}
